<?php

use app\common\controller\Api;
use think\Request;
use app\api\validate\OrderValidate;
use think\Validate;

/**
 * Created by PhpStorm
 * Author Henry
 * Date: 2022/1/17 14:02
 * Email: 1173@mapgoo.net
 */

class Order extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];
    
    
    /**
     * 验证器
     * @var \app\api\validate\OrderValidate
     */
    public $validate;
    
    
    public $request;
    
    public function __construct(Request $request)
    {
        $this->validate = new OrderValidate();
        $this->request = $request;
    }
    
    /**
     * NAME: 获取用户订单列表
     * @author Henry
     */
    public function getOrderList()
    {
        $param = [
            'openid' => $this->request->param('openid'),
        ];
        if(!$this->validate->scene('openid')->check($param)){
            ajax_info(1, $this->validate->getError());
        }
    }
}
